package com.xoa.controller.event;

import com.xoa.model.event.TimeLinePostRole;
import com.xoa.service.event.TimeLinePostRoleService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by 张丽军 on 2017/9/1.
 */
@RestController
@RequestMapping("/timeLinePostRole")
public class TimeLinePostRoleController {
    @Autowired
    TimeLinePostRoleService timeLinePostRoleService;

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午13:22:25
     * 方法介绍:   修改大事记管理角色信息
     * @param request
     * @param timeLinePostRole
     * @return
     */
    @ResponseBody
    @RequestMapping("/updateTimeLinePostRole")
    public ToJson<TimeLinePostRole> updateTimeLinePostRole(HttpServletRequest request,TimeLinePostRole timeLinePostRole){
        return timeLinePostRoleService.updateTimeLinePostRole(request,timeLinePostRole);
    }

    /**
     * 创建作者:   张丽军
     * 创建日期:   2017-09-01 下午13:32:25
     * 方法介绍:   新建大事记管理角色信息
     * @param request
     * @param timeLinePostRole
     * @return
     */
    @ResponseBody
    @RequestMapping("/addTimeLinePostRole")
    public ToJson<TimeLinePostRole> addTimeLinePostRole(HttpServletRequest request,TimeLinePostRole timeLinePostRole){
        return timeLinePostRoleService.addTimeLinePostRole(request,timeLinePostRole);
    }
}
